package megrez.mail.sender;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mail.javamail.JavaMailSender;

import lombok.extern.slf4j.Slf4j;
import megrez.mail.sender.common.MailSenderService;

/**
 * 自动配置
 * 
 * @author Lucky Yang
 * @since 2.6.9
 */
@Slf4j
@Configuration
public class JavaAutoConfig {


    @Bean
    public MailSenderService mailSenderService(JavaMailSender javaMailSender) {
        log.info("starter-java-sender plugin enabled");
        return new JavaMailSenderService(javaMailSender);
    }
}
